package cn.liontalk.microserviceorder.config.rest;

import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import sun.net.www.http.HttpClient;

public class RestClient extends RestTemplate {
//    public RestClient(String username, String password) {
//        CredentialsProvider credsProvider = new BasicCredentialsProvider();
//        credsProvider.setCredentials(
//                new AuthScope(null, -1),
//                new UsernamePasswordCredentials(username, password));
//        HttpClient httpClient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();
//        setRequestFactory(new HttpComponentsClientHttpRequestFactory(httpClient));
//    }
}